using System.Collections.Generic;
using BuildWheel;
using UnityEngine;
using UnityEditor;
using File = System.IO.File;

public class ConverToFileObject
{
    [MenuItem("Tools/ConverToFileObject")]
    static void Convert()
    {
        var content = File.ReadAllText($"{Application.streamingAssetsPath}/main_manifest.json");
        var ls = Json.DeserializeJson<List<ResData>>(content);
        var obj = AssetDatabase.LoadAssetAtPath<FileObject>("Assets/Resources/FileObject.asset");
        obj.EditorRef(ls);
        EditorUtility.SetDirty(obj);
        AssetDatabase.SaveAssets();
    }
}